function picture_note(varargin)
%picture note
%example:picture_note('title','picture comparison','xLabel','xpixels','yLabel','ypixels')

if mod(length(varargin),2)~=0
   error('input argument number must be even');
end

titleText='';
xLabelText='';
yLabelText='';
noteText='';

argumentN=length(varargin);
for i=1:argumentN
    if strcmp(varargin{i},'title')
        titleText=varargin{i+1};
    elseif strcmp(varargin{i},'xLabel')
        xLabelText=varargin{i+1};
    elseif strcmp(varargin{i},'yLabel')
        yLabelText=varargin{i+1};
    elseif strcmp(varargin{i},'note')
        noteText=varargin{i+1};
    end
end

if ~isempty(titleText)
    if ~isempty(noteText)
        titleYPos=0.02;
    else
        titleYPos=4.5;
    end
    text(-0.5,titleYPos,titleText, 'FontUnits', 'normalized', 'FontSize',0.2, ...
        'FontWeight','bold','HorizontalAlignment','center','HorizontalAlignment','center');
end

if ~isempty(xLabelText)
    text(-0.5,-0.2,xLabelText,'FontUnits', 'normalized', 'FontSize',0.15, ...
        'HorizontalAlignment','center','HorizontalAlignment','center');   
end

if ~isempty(yLabelText)
    text(-2.15,2,yLabelText,'FontUnits', 'normalized', 'FontSize',0.15, ...
        'HorizontalAlignment','center','VerticalAlignment','middle','Rotation',90);   
end

if ~isempty(noteText)
    text(0,.075,note,'FontUnits', 'normalized', 'FontSize',0.04, ...
        'HorizontalAlignment','center','VerticalAlignment','middle');   
end
